﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Binding;

namespace UserControlExamples.ViewModelProviders
{
    public class CustomerListViewModelProvider
    {
        public static ViewModels.CustomerListViewModel GetDummyCustomerListViewModel()
        {
            ViewModels.CustomerListViewModel oModel = new ViewModels.CustomerListViewModel();


            NotifyPropertyCollection<ViewModels.CustomerViewModel> oList = new NotifyPropertyCollection<ViewModels.CustomerViewModel>();
            oList.Add(new ViewModels.CustomerViewModel { CustomerId = 1, CustomerName = "FirstCustomer" } );
            oList.Add(new ViewModels.CustomerViewModel { CustomerId = 2, CustomerName = "SecondCustomer" } );
            oList.Add(new ViewModels.CustomerViewModel { CustomerId = 3, CustomerName = "Third" });

            oModel.ListCustomerViewModel = oList;

            oModel.CustomerTypeList.Add(new Model.CustomerType { CustomerTypeId = 1, CustomerTypeName = "CustomerType 1" });
            oModel.CustomerTypeList.Add(new Model.CustomerType { CustomerTypeId = 3, CustomerTypeName = "CustomerType 3" });
            oModel.CustomerTypeList.Add(new Model.CustomerType { CustomerTypeId = 5, CustomerTypeName = "CustomerType 5" });

            oModel.SelectedCustomerTypeId = 3;

            return oModel;
        }
    }
}